<form class="form-horizontal" id="form-add-category">


    <div class="form-group">
        <label class="control-label col-xs-2">
            所属商会
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            {include file="public:busAndDepartSerarch" bussiness-num-name='bussiness_id' department-num-name='department_id' /}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            商会职务
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <select id="duties-selector" name="duties_id" class="form-control" tabindex="-1" required>
                <option value="">
                    无选择
                </option>
                {volist name="duties_list" id="item" }
                <option value="{$item.id}">{$item.title}</option>
                {/volist}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            从事行业
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <select id="industry-selector" name="industry_id" class="form-control" tabindex="-1" required>
                <option value="">
                    无选择
                </option>
                {volist name="industry_list" id="item" }
                <option value="{$item.id}">{$item.title}</option>
                {/volist}
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            手机号
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="number" class="form-control" name="mobile" placeholder="请输入手机号" required>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            姓名
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="text" class="form-control" name="real_name" placeholder="请输入姓名" required>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-2">
            登录密码
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="text" class="form-control" name="password" placeholder="请输入登录密码" required>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            邮箱
        </label>
        <div class="col-xs-9">
            <input type="text" class="form-control" name="email" placeholder="请输入邮箱">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            头像
        </label>
        <div class="col-xs-9">
            {include file="public/singleImageUploader" uploader-name="avatar" /}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">个人介绍</label>
        <div class="col-xs-9">
            <textarea style="height: 150px;line-height: 25px;" class="form-control" name="abstract" placeholder="请输入个人介绍"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">服务内容</label>
        <div class="col-xs-9">
            <textarea style="height: 150px;line-height: 25px;" class="form-control" name="server" placeholder="请输入服务内容"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            个人荣誉
        </label>
        <div class="col-xs-9">
            <input type="text" class="form-control" name="honor" placeholder="个人荣誉以 * 号隔开">
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-offset-2 col-xs-3">
            <button type="submit" class="btn btn-success btn-block">确认添加</button>
        </div>
    </div>
</form>

<script src="__PUBLIC__/vendors/jquery.validation/jquery.validate.min.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/additional-methods.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/messages_zh.min.js"></script>
<script src="__PUBLIC__/vendors/select2/js/select2.min.js"></script>
<script type="application/javascript">
    $(function () {
        $("#form-add-category").validate({
            messages:
                {
                    deties_id: "请选择商会职务",
                    industry_id: "请选择从事行业",
                    real_name: "请输入姓名",
                    mobile: "请输入手机号",
                    password: "请输入密码"
                },
            debug: true,
            submitHandler: function () {
                ajaxSubmit('form-add-category', true);
            }
        });

        $("#duties-selector").select2({
            placeholder: "选择商会职务",
            allowClear: true,
            width:'100%'
        });
        $("#industry-selector").select2({
            placeholder: "选择从事行业",
            allowClear: true,
            width:'100%'
        });
    })
</script>